﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Directory.Web.Search"
    MasterPageFile="~/DefaultMasterPage.master" Theme="Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>
        <% = Directory.Web.WebSettings.GetInstance().SiteName %>-搜索</title>
</asp:Content>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="main_search">
        <asp:TextBox ID="tbKeywords" runat="server" class="text"></asp:TextBox>        
        <asp:DropDownList ID="ddlSearchType" runat="server">
        </asp:DropDownList>
        <asp:Button ID="btnSearch" runat="server" Text="搜索" OnClick="btnSearch_Click" />    
    </div>
</asp:Content>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <asp:Literal ID="ltMsg" runat="server"></asp:Literal>
    <div class="child_List">
        <asp:Repeater ID="rptCateogrys" runat="server">
            <HeaderTemplate>
                <style type="text/css">
                    .f_itemcount_0:display:none;</style>
                <ul>
            </HeaderTemplate>
            <ItemTemplate>
                <li>
                    <img src="imgs/fldr.gif" />
                    <a href="itemview.aspx?categoryId=<%# Eval("CategoryId") %>" target="_blank">
                        <%# Eval("CategoryName") %></a> <font style='display: <%# Convert.ToInt32(Eval("ItemsCount","{0}"))>0?"":"none" %>'>
                            <%# Eval("ItemsCount","({0})") %></font> </li>
            </ItemTemplate>
            <FooterTemplate>
                </ul></FooterTemplate>
        </asp:Repeater>
    </div>
    <div class="content_list" id="Search_content_list">
        <asp:Repeater ID="rptItemsList" runat="server" OnItemDataBound="rptItemsList_ItemDataBound">
            <HeaderTemplate>
                <ol>
            </HeaderTemplate>
            <ItemTemplate>
                <li>
                    <p class="list_title">
                        <%# this.pageIndex*this.pageSize + Container.ItemIndex + 1 %>. <a href="<%# Eval("LinkUrl") %>"
                            target="_blank">
                            <%# Eval("Title")%></a> &nbsp;-&nbsp;
                        <%# Eval("LinkUrl") %>
                        &nbsp; &nbsp; &nbsp; &nbsp; <span clas="ltCategoryPath"><strong>所属<% = Resources.Resource.ResourceManager.GetString("Category") %></strong>
                            <asp:Literal ID="ltCategoryPath" runat="server"></asp:Literal><span>
                    </p>
                    <div class="compress">
                        <p class="ico">
                            <a href="<%# Eval("LinkUrl") %>" target="_blank">
                                <img src="<%# Eval("LogoPath")%>" onerror="this.style.display='none'"/></a>
                        </p>
                        <%# Eval("Description")%>
                    </div>
                </li>
            </ItemTemplate>
            <FooterTemplate>
                </ol></FooterTemplate>
        </asp:Repeater>
    </div>
    <p runat="server" id="pagebreak" visible="false">
        <asp:HyperLink ID="hplFirstPage" runat="server">第一页</asp:HyperLink>&nbsp;
        <asp:HyperLink ID="hplPrePage" runat="server">上一页</asp:HyperLink>&nbsp; 第&nbsp;<asp:Label
            ID="lbCurrentPage" runat="server" Text=""></asp:Label>&nbsp;页&nbsp;
        <asp:HyperLink ID="hplNextPage" runat="server">下一页</asp:HyperLink>&nbsp;
        <asp:HyperLink ID="hplLastPage" runat="server">最后一页</asp:HyperLink>&nbsp; 总计&nbsp;<% = this.itemsRecords.ToString() %>&nbsp;条
    </p>
</asp:Content>
